#include "utils.h"

std::string& Utils::replaceAll (std::string& context, const std::string& from, const std::string& to)
{
  size_t here = 0;
  size_t found;
  while((found = context.find(from, here)) != std::string::npos)
    {
      context.replace(found, from.size(), to);
      here = found + to.size();
    }
  return context;
}
